package com.youlai.boot.modules.webapp.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * HivisionIDPhotos API 配置
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "hivision.idphoto")
public class HivisionIdPhotoConfig {
    
    /**
     * API 基础URL
     */
    private String baseUrl = "http://127.0.0.1:7860/";
    
    /**
     * 超时时间(毫秒)
     */
    private int timeout = 10000;
    
    /**
     * 图片上传路径
     */
    private String uploadPath = "/upload/idphoto/";
    
    /**
     * 返回完整的API路径
     */
    public String getIdPhotoUrl() {
        return baseUrl + "idphoto";
    }
    
    public String getAddBackgroundUrl() {
        return baseUrl + "add_background";
    }
    
    public String getHumanMattingUrl() {
        return baseUrl + "human_matting";
    }
    
    public String getSetKbUrl() {
        return baseUrl + "set_kb";
    }
    
    public String getGenerateLayoutPhotosUrl() {
        return baseUrl + "generate_layout_photos";
    }
    
    public String getWatermarkUrl() {
        return baseUrl + "watermark";
    }
    
    public String getIdPhotoCropUrl() {
        return baseUrl + "idphoto_crop";
    }
} 